package com.wang.spring.basic_di.g_complexfield.bean;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.*;


@Component
public class Person1 {

    @Value("#{new String[]{'张三','李四','王五'}}")
    private String[] names;

    @Value("#{{'186','189','134'}}")
    private List<String> tels;

    @Value("#{{@miaomiao,new com.wang.spring.basic_di.g_complexfield.bean.Cat1()}}")
    private Set<Cat1> cats;

    @Value("#{{'喵喵':@miaomiao.name,'猫猫':new com.wang.spring.basic_di.g_complexfield.bean.Cat1().name}}")
    private Map<String, Object> events;

    @Value("#{{'key':'value','123':'新的额','颜色':'红色'}}")
    private Properties props;

    public String[] getNames() {
        return names;
    }

    public void setNames(String[] names) {
        this.names = names;
    }

    public List<String> getTels() {
        return tels;
    }

    public void setTels(List<String> tels) {
        this.tels = tels;
    }

    public Set<Cat1> getCats() {
        return cats;
    }

    public void setCats(Set<Cat1> cats) {
        this.cats = cats;
    }

    public Map<String, Object> getEvents() {
        return events;
    }

    public void setEvents(Map<String, Object> events) {
        this.events = events;
    }

    public Properties getProps() {
        return props;
    }

    public void setProps(Properties props) {
        this.props = props;
    }

    @Override
    public String toString() {
        return "Person1{" +
                "names=" + Arrays.toString(names) +
                ", tels=" + tels +
                ", cats=" + cats +
                ", events=" + events +
                ", props=" + props +
                '}';
    }
}
